﻿@using Pyramid.Models
@using Pyramid.Mvc.Html
@model  IEnumerable<PayeeRecord>
@{
	var bag = (PagerModel)ViewBag.Bag;
	var qm = (PaymentQueryModel) ViewBag.QueryModel;
}

@using (Html.BeginForm("PaymentList", "MemberCenter", FormMethod.Post, new {id = "pagerForm"}))
{
	<input type="hidden" name="pageNum" value="1" />
	<input type="hidden" name="numPerPage" value="${model.numPerPage}" />
}

<div class="pageHeader">
	@using (Html.BeginForm("PaymentList", "MemberCenter", FormMethod.Post, new {onsubmit = "return navTabSearch(this);"}))
	{
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>查询关键词：<input type="text" name="keywords" rel="pagerForm" value="@qm.Keywords" /></td>
				</tr>
			</table>
		</div>
		<div class="subBar">
			<table>
				<tr>
					<td>成立日期从 
						<input type="text" name="DateTimeFrom" class="date" readonly="readonly" rel="pagerForm" value="@Html.DateString(qm.DateTimeFrom)" />
						至 
						<input type="text" name="DateTimeTo" class="date" readonly="readonly" rel="pagerForm"  value="@Html.DateString(qm.DateTimeTo)"/>
					</td>
					<td>&nbsp;&nbsp;</td>
					<td>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">查询</button>
							</div>
						</div>
					</td>
				</tr>
			</table>
		</div>
	}
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="@Url.Action("CreatePaymentApply")" target="navTab" rel="tab_mcm_payment_edit"><span>新增收款申请</span></a></li>
			<li><a class="edit" href="@Url.Action("EditPaymentApply", new { id = "{id}" })" target="navTab" rel="tab_mcm_payment_edit"><span>编辑和查看收款申请</span></a></li>
			<li><a class="delete" href="@Url.Action("DeletePaymentApply",new {id="{id}"})" target="ajaxTodo" title="确定要删除吗？"><span>删除</span></a></li>
		</ul>
	</div>
	@Html.Partial("_PaymentListView")
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="20">20</option>
				<option value="50">50</option>
				<option value="100">100</option>
				<option value="200">200</option>
			</select>
			<span>条，共 @bag.TotalCount 条</span>
		</div>
		<div class="pagination" targettype="navTab" totalcount="@bag.TotalCount" numperpage="@bag.PageSize" pagenumshown="10" currentpage="@bag.CurrentPageIndex"></div>
	</div>
</div>
